package panda.syntax;

import panda.query.condition.SubqueryValue;
import panda.record.TableToken;

public class TblRef {
	private String tableName;
	private String alias;
	private SubqueryValue subquery;
	private TableToken tt;
	
	public TblRef(String t) {
		tableName = t;
		alias = null;
		subquery = null;
	}
	
	public TblRef(String t, String a) {
		tableName = t;
		alias = a;
		subquery = null;
	}
	public TblRef(SubqueryValue query, String a) {
		tableName = "TempTable";
		alias = a;
		subquery = query;
	}
	
	public String getTableName() {
		return tableName;
	}
	
	public String getAlias() {
		return alias;
	}
	
	public SubqueryValue getSubQuery() {
		return subquery;
	}
	
	public void setToken(TableToken tt) {
		this.tt = tt;
	}
	
	public TableToken getToken() {
		return tt;
	}
}
